-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
function types: optional and vararg arguments. #650
Conversation
d004209
to
1244f73
Compare
@@ -6,7 +6,9 @@ | |||
* found in the LICENSE file at https://angular.io/license | |||
*/ | |||
|
|||
import {expect} from 'chai'; | |||
import {expect, use as chaiUse} from 'chai'; | |||
// tslint:disable-next-line:no-require-imports chai-diff needs a CommonJS import. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How come? You can
import * as chaiDiff from 'chai-diff';
and then use it as a function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a wontfix TypeScript issue about it:
microsoft/TypeScript#5073
@@ -35,6 +35,7 @@ | |||
"@types/source-map": "^0.5.1", | |||
"@types/source-map-support": "^0.2.27", | |||
"chai": "^3.5.0", | |||
"chai-diff": "^1.0.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good, but FWIW in my experience it's easier to just let the thing write out new goldens and examine the output with 'git diff'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I'm interactively tweaking the emit, I find it much easier to see a good diff there than re-gen the goldens. That also runs a high risk of missing a change. But I understand workflows are different.
20ca325
to
44fc351
Compare
Previously, this would dump two long strings including escaped newlines and quotes, which made it ~impossible to tell the difference.
Previously, tsickle would support optional and varag arguments in function declarations (`@param` tags etc), but not in pure function types.
44fc351
to
b09b0e8
Compare
No description provided.